using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class failTrigger : MonoBehaviour
{
    void OnTriggerEnter2D(Collider2D x)
    {
        if (x.CompareTag("Player"))
        {
            if (x.gameObject.GetComponent<SimpleRocket>()._isGhost) return;
            x.gameObject.GetComponent<SimpleRocket>().desSelf();
            //endGame.ins.endgame();
            Invoke("defer", 1.0f);
        }
    }
    public void defer()
    {
        endGame.ins.endgame();
    }
}
